<?php
	header('content-type: application/json');

	$path = './uploadfiles/';
	$file = $_FILES['Filedata'];

	if(!file_exists($path)){
		mkdir($path);
	}
	
	move_uploaded_file($file['tmp_name'], $path.$file['name']);

	$result = array('status' => 0, 'url' => $path.$file['name']);
	echo json_encode($result);
?>